package com.example.search.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;
import java.math.BigDecimal;

@ApiModel(description = "Goods实体")
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Accessors(chain = true)
@Document(indexName = "big_data_center_goods", type = "goods", shards = 1, replicas = 0)
public class Goods implements Serializable {

    @ApiModelProperty(value = "主键ID", example = "ce2e7aaf4ecd45e59967668d06441dc9")
    @Id
    private String id;
    @ApiModelProperty(value = "店铺编码", example = "123456")
    private String shopCode;
    @ApiModelProperty(value = "商品名称", example = "商品名称")
    private String goodsName;
    @ApiModelProperty(value = "商品价格", example = "123.1")
    private BigDecimal price;
    @ApiModelProperty(value = "商品描述", example = "商品描述")
    private String desc;
    @ApiModelProperty(value = "创建时间", example = "2020-03-29 15:52:11")
    private String createTime;


}
